# -*- codeing = utf-8 -*-
# @Time : 2021/2/22 16:20
# @Atuthor: 朱朱
# @File: 043列表的遍历.py
# @Software: PyCharm

# 遍历: 将所欲的数据都访问一遍。遍历针对的是可迭代对象
# while循环遍历  / for...in 循环遍历
heros = ['阿珂', '嬴政', '韩信', '露娜', '后羿', '亚瑟', '李元芳']

# i = 0
# while i<len(heros):
#     print(heros[i])
#     i+=1

# heros.index() 打印出下标
for k in heros:
    print(heros.index(k),'=>',k)
